<div class="hover <? echo $index % 2 ? 'even' : 'odd'; ?>">

	<?php
	if (!Yii::app()->user->isGuest) {
		$baseUrl = Yii::app()->request->baseUrl . '/images/fugue';
		$blacklist = ($data->type == News::TYPE_SMS ||
			$data->type == News::TYPE_EMAIL ||
			$data->type == News::TYPE_WEB) &&
			$rights['blacklist'];
		$properties = array(
			'items'=>array(
				array(
					'label'=>"<img src=\"$baseUrl/slash.png\" />",
					'url'=>array('blacklist', 'id'=>$data->_id),
					'linkOptions'=>array('title'=>'Blacklist sender'),
					'visible'=>$blacklist,
				),
				array(
					'label'=>"<img src=\"$baseUrl/eraser.png\" />",
					'url'=>array('hide', 'id'=>$data->_id),
					'linkOptions'=>array('title'=>'Hide'),
					'visible'=>!$data->hidden && $rights['hide'],
				),
				array(
					'label'=>"<img src=\"$baseUrl/eraser--minus.png\" />",
					'url'=>array('unhide', 'id'=>$data->_id),
					'linkOptions'=>array('title'=>'Unhide'),
					'visible'=>$data->hidden && $rights['unhide'],
				),
				array(
					'label'=>"<img src=\"$baseUrl/pin--plus.png\" />",
					'url'=>array('sticky', 'id'=>$data->_id),
					'linkOptions'=>array('title'=>'Sticky'),
					'visible'=>!$data->sticky && $rights['sticky'],
				),
				array(
					'label'=>"<img src=\"$baseUrl/pin--minus.png\" />",
					'url'=>array('unsticky', 'id'=>$data->_id),
					'linkOptions'=>array('title'=>'Unsticky'),
					'visible'=>$data->sticky && $rights['unsticky'],
				),
				array(
					'label'=>"<img src=\"$baseUrl/pencil.png\" />",
					'url'=>array('update', 'id'=>$data->_id),
					'linkOptions'=>array('title'=>'Update'),
					'visible'=>$rights['update'],
				),
			),
			'htmlOptions'=>array(
				'class'=>'operations',
			),
			'encodeLabel'=>false,
		);
		$this->widget('zii.widgets.CMenu', $properties);
	}
	?>

	<div class="<?php echo $data->type; ?>">
		<b>
			<?php echo CHtml::encode($data->senderComplete); ?>
		</b>

		<?php
		$date = $data->dateTime;
		$formatter = Yii::app()->dateFormatter;
		$date = $formatter->formatDateTime($date, $dateFormat, 'short');
		echo "($date)";
		?>
	</div>

	<?php
	if ($data->type == News::TYPE_EMAIL || $data->type == News::TYPE_WEB ||
		$data->type == News::TYPE_SMS) {
		$data->value = CHtml::encode($data->value);
	}
	echo nl2br($data->value);
	?>

	<br />

</div>